package pers.xds.wtuapp.web.database.bean;

import org.hibernate.validator.constraints.Length;
import pers.xds.wtuapp.web.database.group.InsertGroup;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Null;
import java.sql.Timestamp;

/**
 * 收购表实体类
 * @author DeSen Xu
 * @date 2023-02-16 16:42
 */
public class Acquisition {

    /**
     * id
     */
    @Null(groups = InsertGroup.class)
    private Integer id;

    /**
     * 发布者id
     */
    @Null(groups = InsertGroup.class)
    private Integer ownerId;

    /**
     * 收购标题
     */
    @NotEmpty(groups = InsertGroup.class)
    @Length(groups = InsertGroup.class, max = 30, min = 2)
    private String title;

    /**
     * 描述
     */
    @Length(groups = InsertGroup.class, max = 5000)
    private String description;

    /**
     * 创建时间
     */
    @Null(groups = InsertGroup.class)
    private Timestamp createTime;

    /**
     * 联系方式
     */
    @NotEmpty(groups = InsertGroup.class)
    @Length(groups = InsertGroup.class, max = 60, min = 2)
    private String contract;

    /**
     * 期望价格
     */
    @Length(groups = InsertGroup.class, max = 20)
    private String expectPrice;

    /**
     * 是否有效
     */
    @Null(groups = InsertGroup.class)
    private Boolean active;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Integer ownerId) {
        this.ownerId = ownerId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getContract() {
        return contract;
    }

    public void setContract(String contract) {
        this.contract = contract;
    }

    public String getExpectPrice() {
        return expectPrice;
    }

    public void setExpectPrice(String expectPrice) {
        this.expectPrice = expectPrice;
    }

    public Boolean getActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }
}
